<?
if(isset($var_name) && isset($var_value)){
    if($var_name!="" && $var_value!=""){
	include("include/config.inc");
	include("include/conn_db.inc");
    	$sql="SELECT * FROM ".$db_array[$var_name]." WHERE id='".$var_value."'";
    	$result=mysql_fetch_array(mysql_query($sql, $conn_db));
    	$result["commented"]=!$result["commented"];
    	$sql="UPDATE ".$db_array[$var_name]." SET commented= '".$result["commented"]."' WHERE id='".$var_value."'";
	$result=mysql_query($sql, $conn_db);
	if(mysql_error()){
	    echo "alert('".addslashes(mysql_error())."');";
	}
    }
}
?>